package cn.tedu._05weibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class UserRegDTO {
    //@NotNull(message = "用户名不能为空")
    //@NotEmpty(message="用户名不能为空亦不可为空字符串")
    //@NotBlank(message = "用户名不可为空,空字符串或空白字符串")
    //@Size(min = 2,max = 12, message = "用户名长度必须为6-12之间")
    @Pattern(regexp="^[\\u4e00-\\u9fa5]{2,6}$|^[A-Za-z0-9_]{3,14}$")
    @ApiModelProperty(value = "用户名" ,required = true)
    private String username;
    @ApiModelProperty(value = "密码",required = true)
    private String password;
    @ApiModelProperty(value = "昵称" , required = true)
    private String nickname;
}
